package com.algernoon.rpc.springrpc.rmi.burlap;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.caucho.BurlapServiceExporter;

@SuppressWarnings("deprecation")
@Configuration
public class BurlapRmiServerConfig {

	@Autowired
	private IBurlapUserService burlapUserService;
	
	@Bean(name = "/BurlapUserService")
	public BurlapServiceExporter burlapExporter() {
		BurlapServiceExporter exporter = new BurlapServiceExporter();
		exporter.setService(burlapUserService);
		exporter.setServiceInterface(IBurlapUserService.class);
		exporter.afterPropertiesSet();
		return exporter;
	}
	
}
